package com.jonniespratley.generators.mysql.data
{
	import mx.collections.ArrayCollection;

    [Bindable]
	public final class Model
	{
		private static var instance:Model;
		public function Model()
		{
			if( instance != null ) {
				throw new Error( "Error: Singletons can only be instantiated via getInstance() method!" );
			}
			Model.instance = this;
		}
		public static function getInstance():Model
		{
			if( instance == null )	{
				instance = new Model();
			}
			return instance;
		}

		public var databaseCollection:ArrayCollection;
		public var tableCollection:ArrayCollection;
		public var fieldCollection:ArrayCollection;
		public var selectedDatabase:Database;
		public var selectedTable:Table;
		public var selectedField:Field;

		public var workflowState:uint = 0;
		public static const LOGIN_SCREEN:uint = 0;
		public static const WELCOME_SCREEN:uint = 1;
	}
}